<%--
/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is the StikiWeb Wiki 
 *
 * The Initial Developer of the Original Code is Lee Haslup (biglee@haslups.com).
 * Portions created by the Initial Developer are Copyright (C) 2004
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *
 * ***** END LICENSE BLOCK ***** */
 * $Id: upload.jsp,v 1.5 2004/05/07 15:06:10 biglee Exp $
--%> 
<%@ page language="java" contentType="text/html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html>
  <head>
  	<link rel='icon' href='images/logo1.png' type='image/png' />
  	<link rel='shortcut icon' href='images/logo1.png' type='image/png' />
    <title>
      StikiWeb: Upload Attachment- <bean:write name="attachment" property = "name" />
    </title>
  </head>
<body>
	<table width='100%' height='100%' bgcolor="lightblue">
		<tr>
			<td width='10%'>
				<img src="images/logomed.png" alt="STIKIWEB"/>
			</td>
			<td width='90%'>
				<h1>
					StikiWeb - Attach a file to page: 
					<bean:write name="attachment" property = "name" />
				</h1>
			</td>
		</tr>
		<tr>
			<td>
				&nbsp;
			</td>
			<td valign='top'>
		   <table width='400' border="0" bgcolor='white'>
			   <tr>
				   <td colspan="2"> 
					  <html:errors />
					   <p>Please select a file to attach to page <bean:write name="attachment" property = "name" />.
					   </p>
					   <p><i>Note: the maximum size currently allowed for  a single attachment to this page
						   is  <b><bean:write name="attachment" property="maxSize" /> bytes</b>.  This limit is enforced
						   on the server end <b>after the upload</b> so please check your file size to avoid a long
						   wait to upload a large file that the server will discard.</i>
						   </p><hr />
				   </td>
			   </tr>
			   <tr>
				   <th align="right">
					   File:
				   </th>
				  <td align="left">
			 		  <html:form action='/attach.do' focus='theAttachment' enctype="multipart/form-data">
					  	  <html:hidden property="name" />
						  <html:file property="theAttachment" /><br />
					  <html:submit property="attach" >
						  Attach File to page - <bean:write name="attachment" property = 'name' />
					  </html:submit>
			  		  </html:form>
				  </td>
			   </tr>
			   <tr>
				  <th align="right">
					  &nbsp;
				  </th>
				  <td align="left">
				  	  <!-- Separate form to cancel -- no point uploading the file -->
			 		  <html:form action='/attach.do'>
					  	  <html:hidden property="name" />
						  <html:submit property="cancel" >
							  Cancel
						  </html:submit>
					  </html:form>
				  </td>
				</tr>
			  </table>
			</td>
		</tr>
	</table>
</body>
</html>